Add Signers
The Add Signers API is used to add signers from a wallet account based on the provided Account ID. This API creates a ticket with an unsigned envelope by utilizing the updated legal representative details. This API simplifies the process of managing signers for a wallet account, allowing for easy addition of signers based on the specified action type.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
ID Mandatory | String Represents the unique identifier of the wallet account to which signers will be added. Ex: "1103001" |
legalRep Mandatory | Object |
keyStorage Mandatory | String Indicates the storage method for the representative's key. Ex: "ON_DEVICE" or "HARDWARE_LEDGER" |
ID Mandatory | String Unique identifier for the legal representative. Ex: "994003" |
weightAge Mandatory | Number Specifies the weight or importance of the legal representative in the signer setup. Ex: 1 |
actionType Mandatory | String Indicates the type of action to be performed. Ex: "ADD" |
- cURL
- C#
- Go
- NodeJs
curl --location '{{url}}/rpc/WalletService/UpdateWalletAccountSigners' \
--header 'DiviceID: 8020' \
--header 'Signature: keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic e3tFbWFpbH19Ont7UGFzc3dvcmR9fQ==' \
--data '{"ID":"1103001","legalRep":{"keyStorage":"ON_DEVICE","ID":"994003","weightAge":1},"actionType":"ADD"}'
var options = new RestClientOptions("{{url}}")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/fednowbackend/rpc/WalletService/UpdateWalletAccountSigners", Method.Post);
request.AddHeader("DiviceID", "8020");
request.AddHeader("Signature", "keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Basic e3tFbWFpbH19Ont7UGFzc3dvcmR9fQ==");
var body = @"{
" + "\n" +
@" ""ID"": ""1103001"",
" + "\n" +
@" ""legalRep"": {
" + "\n" +
@" ""keyStorage"": ""ON_DEVICE"",
" + "\n" +
@" ""ID"": ""994003"",
" + "\n" +
@" ""weightAge"": 1
" + "\n" +
@" },
" + "\n" +
@" ""actionType"": ""ADD""
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{url}}/rpc/WalletService/UpdateWalletAccountSigners"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"ID": "1103001",`+"
"+`
"legalRep": {`+"
"+`
"keyStorage": "ON_DEVICE",`+"
"+`
"ID": "994003",`+"
"+`
"weightAge": 1`+"
"+`
},`+"
"+`
"actionType": "ADD"`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("DiviceID", "8020")
req.Header.Add("Signature", "keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic e3tFbWFpbH19Ont7UGFzc3dvcmR9fQ==")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{url}}',
'path': '/fednowbackend/rpc/WalletService/UpdateWalletAccountSigners',
'headers': {
'DiviceID': '8020',
'Signature': 'keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=',
'Content-Type': 'application/json',
'Authorization': 'Basic e3tFbWFpbH19Ont7UGFzc3dvcmR9fQ=='
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"ID": "1103001",
"legalRep": {
"keyStorage": "ON_DEVICE",
"ID": "994003",
"weightAge": 1
},
"actionType": "ADD"
});
req.write(postData);
req.end();
Body
{
"ID": "1103001",
"legalRep": {
"keyStorage": "ON_DEVICE",
"ID": "994003",
"weightAge": 1
},
"actionType": "ADD"
}
Response: 200
Response Parameters
Parameter | Description |
---|---|
ID | String Represents the unique identifier of the wallet account to which signers will be added. Ex: "1103001" |
customerID | String Refers to the unique identifier of the customer associated with the wallet account. Ex: "100000000041001" |
legalRep | Object |
ID | String Unique identifier for the legal representative. Ex: "994003" |
name | String Specifies the name of the legal representative. Ex: "Tejaswi" |
createdDate | String Represents the date and time of the representative's creation. Ex: "0001-01-01T00:00:00Z" |
updatedDate | String Indicates the date and time of the last update made to the representative's information. Ex: "0001-01-01T00:00:00Z" |
contact | Object |
String Represents the email address of the representative. Ex: "chennareddy.s+2@netxd.com" | |
phoneNumber | String Specifies the phone number of the representative. Ex: "9087493944" |
weightAge | Number Specifies the weight or importance of the legal representative in the signer setup. Ex: 1 |
keyStorage | String Indicates the storage method for the representative's key. Ex: "ON_DEVICE" |
keyStatus | String Represents the status of the representative's key generation. Ex: "PENDING_KEY_GENERATION" |
actionType | String Indicates the type of action to be performed. Ex: "ADD" |
{
"ID": "1103001",
"customerID": "100000000041001",
"legalRep": {
"ID": "994003",
"name": "Tejaswi",
"createdDate": "0001-01-01T00:00:00Z",
"updatedDate": "0001-01-01T00:00:00Z",
"contact": {
"email": "chennareddy.s+2@netxd.com",
"phoneNumber": "9087493944"
},
"weightAge": 1,
"keyStorage": "ON_DEVICE",
"keyStatus": "PENDING_KEY_GENERATION"
},
"actionType": "ADD"
}